<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .box{width:300px;height:100px;background: red;}
    </style>
</head>
<body>
    <div class="box" onclick="alert('hello world')"></div>
</body>
<script src="./test.js"></script>
<script>

    alert('hello world2')
    alert('hello world1')

</script>
</html>